export class PersonV4 {
  private readonly name: string = "";

  constructor(name?: string) {
    if (name) {
      this.name = name;
    }
  }

  public Show(): string {
    return `${this.name} 装扮是 `;
  }
}

export class Finery extends PersonV4 {
  private component: PersonV4 | undefined;

  Decorate(component: PersonV4) {
    this.component = component;
  }

  public Show(): string {
    if (this.component) {
      return this.component.Show();
    } else {
      return "";
    }
  }
}

export class Shirts extends Finery {
  Show(): string {
    let outStr = super.Show();
    outStr += "T恤 ";
    return outStr;
  }
}
export class BigTrouser extends Finery {
  Show(): string {
    let outStr = super.Show();
    outStr += "垮裤 ";
    return outStr;
  }
}

export class Sneakers extends Finery {
  Show(): string {
    let outStr = super.Show();
    outStr += "破球鞋 ";
    return outStr;
  }
}

export class Suit extends Finery {
  Show(): string {
    let outStr = super.Show();
    outStr += "西装 ";
    return outStr;
  }
}
export class Tie extends Finery {
  Show(): string {
    let outStr = super.Show();
    outStr += "领带 ";
    return outStr;
  }
}
export class LeatherShoes extends Finery {
  Show(): string {
    let outStr = super.Show();
    outStr += "皮鞋 ";
    return outStr;
  }
}
